home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / biz / demo / afaxdemo1_34.lzh / AfaxDemo / install < prev    next >
AmigaDOS Script File  |  1992-08-26  |  6KB  |  256 lines

  1. .key idir,p2,p3,p4,p5,p6,p7,p8
  2. .bra {
  3. .ket }
  4.  
  5. ; AmigaFax Install script.
  6. ;
  7. ; USAGES:   Double click the Install_Now (or Install_Demo) icon,
  8. ;               or click it once then double click the destination drawer.
  9. ;
  10. ;  In a Shell window, change to the appropriate directory,
  11. ;          eg    cd df0:AFaxDemo
  12. ;            or  cd df0:AmigaFax
  13. ;            then type either
  14. ;                install disk:drawer
  15. ;            or  install
  16.  
  17. assign AmiFax: ""
  18.  
  19. if not "{idir}" eq ""
  20.   if not "{idir}" eq "afax:"
  21.  
  22.     if "{idir}" eq "q"
  23.       echo "Installation cancelled."
  24.       skip to_end
  25.     endif
  26.   
  27.     if "{idir}" eq "n"
  28.       echo "Installation cancelled."
  29.       skip to_end
  30.     endif
  31.   
  32.     if not "{p2}" eq ""
  33.       echo "*N*N*N **** ERROR ****  No double quotes around: {idir} {p2}..."
  34.       skip to_redo
  35.     endif
  36.   
  37.     echo >ram:faxfname {idir}
  38.     search >nil: ram:faxfname ":"
  39.     if warn
  40.       delete >nil: ram:faxfname
  41.       echo "*N*N*N **** ERROR ****  Missing *":*" in {idir}."
  42.       skip to_redo
  43.     endif
  44.     delete >nil: ram:faxfname
  45.  
  46.     if exists "{idir}"
  47.       echo "*N{idir} already exists!"
  48.       ask "Assign afax: to it and continue (y/n)?"
  49.       if not warn
  50.         skip to_redo
  51.       endif
  52.       assign afax: "{idir}"
  53.       if not exists {idir}.info
  54.         if exists AmiFax:/AmigaFax.info
  55.           copy >nil: AmiFax:/AmigaFax.info {idir}.info nopro
  56.     else
  57.           if exists AmiFax:/AFaxDemo.info
  58.             copy >nil: AmiFax:/AFaxDemo.info {idir}.info nopro
  59.       else
  60.             copy >nil: AmiFax:docs.info {idir}.info nopro
  61.           endif
  62.         endif
  63.       endif
  64.       skip to_install
  65.     else
  66.       ask "*NCreate {idir}, assign afax: to it and continue (y/n)?"
  67.       if not warn 
  68.         skip to_redo
  69.       endif
  70.       makedir {idir}
  71.       if warn 
  72.         skip to_redo
  73.       endif
  74.       if exists AmiFax:/AmigaFax.info
  75.         copy >nil: AmiFax:/AmigaFax.info {idir}.info nopro
  76.       else
  77.         if exists AmiFax:/AFaxDemo.info
  78.           copy >nil: AmiFax:/AFaxDemo.info {idir}.info nopro
  79.         else
  80.           copy >nil: AmiFax:docs.info {idir}.info nopro
  81.         endif
  82.       endif
  83.       assign afax: "{idir}"
  84.       skip to_install
  85.     endif
  86.   endif
  87. endif
  88.  
  89.  
  90. assign >nil: afax: exists  
  91. if not warn
  92.   echo "*NThe existing afax assignment is:"
  93.   assign afax: exists
  94.   ask "Do you want to install AmigaFax in this directory (y/n)? "
  95.   if warn
  96.     skip to_install
  97.   endif
  98. endif
  99. skip to_redo
  100.  
  101. lab to_install
  102.  
  103. echo "*NDirectory afax:s"
  104. if exists afax:s
  105.   copy AmiFax:s afax:s nopro
  106.   echo "The Afax:s directory already existed!"
  107.   echo "NOT overwriting files you may have edited:"
  108.   dir AmiFax:s.user
  109.   wait 5 secs
  110. else
  111.   copy AmiFax:s afax:s nopro
  112.   copy AmiFax:s.user afax:s nopro
  113. endif
  114. protect >nil: afax:s/AFAX-Startup +s
  115.  
  116. delete afax:s/User-Startup
  117. echo >ram:fstart "assign afax: {idir}"
  118.  
  119. assign >nil: uucp: exists
  120. if not warn
  121.   join ram:fstart AmiFax:s/User-Startup as afax:s/User-Startup
  122. else
  123.   join ram:fstart AmiFax:s/User-Startup AmiFax:s/UUCPStart as afax:s/User-Startup
  124. endif
  125.  
  126. delete ram:fstart
  127.  
  128. echo  "*NDirectory afax:lib"
  129. if exists afax:lib
  130.   if exists AmiFax:lib
  131.     copy AmiFax:lib afax:lib nopro
  132.   endif
  133.   echo "The afax:lib directory already exists!"
  134.   echo "NOT overwriting files you may have edited:"
  135.   dir AmiFax:lib.user
  136.   wait 5 secs
  137. else
  138.   makedir afax:lib
  139.   if exists AmiFax:lib
  140.     copy AmiFax:lib afax:lib nopro
  141.   endif
  142.   copy AmiFax:lib.user afax:lib nopro
  143. endif
  144. wait 2 secs
  145.  
  146. echo "*NDirectory afax:"
  147. copy AmiFax:#?fax#? afax: nopro
  148. copy AmiFax:READ#?  afax: nopro
  149. copy AmiFax:DEMO#?  afax: nopro
  150.  
  151. echo "*NDirectory afax:Docs"
  152. if not exists afax:Docs.info
  153.   copy AmiFax:Docs.info afax:Docs.info nopro
  154. endif
  155. copy AmiFax:Docs afax:Docs nopro
  156.  
  157. echo "*NDirectory afax:c"
  158. copy AmiFax:c afax:c nopro
  159.  
  160. echo    "*NDirectory afax:libs"
  161. copy AmiFax:libs afax:libs nopro
  162.  
  163. echo "*NDirectory afax:l"
  164. copy AmiFax:l afax:l nopro
  165.  
  166. echo    "*NDirectory afax:devs"
  167. copy AmiFax:devs afax:devs nopro
  168.  
  169. echo "*NDirectory afax:faxdoc"
  170. copy AmiFax:faxdoc afax:faxdoc nopro
  171.  
  172. echo "*NDirectory afax:incoming"
  173. copy AmiFax:incoming afax:incoming nopro
  174.  
  175. echo "*NDirectory afax:spool"
  176. copy AmiFax:spool afax:spool nopro
  177.  
  178. echo "*NDirectory afax:uucp"
  179. copy AmiFax:uucp afax:uucp nopro
  180.  
  181. echo "*NDirectory afax:uucp/s"
  182. copy AmiFax:uucp/s afax:uucp/s nopro
  183.  
  184. echo "*NDirectory afax:uucp/c"
  185. copy AmiFax:uucp/c afax:uucp/c nopro
  186.  
  187. echo  "*NDirectory afax:uucp/lib"
  188. if exists afax:uucp/lib
  189.   echo "The afax:uucp/lib directory already exists!"
  190.   echo "NOT overwriting files you may have edited:"
  191.   dir AmiFax:uucp/lib
  192.   wait 5 secs
  193. else
  194.   copy AmiFax:uucp/lib afax:uucp/lib nopro
  195. endif
  196.  
  197. if not exists l:null-handler
  198.   ask "Install l:null-handler (y/n)?"
  199.   if warn
  200.     copy afax:l/null-handler l:
  201.   endif
  202. endif
  203.  
  204. if not exists l:fifo-handler
  205.   ask "Install fifo-handler and fifo.library (y/n)?"
  206.   if warn
  207.     copy afax:l/fifo-handler l:
  208.     copy afax:libs/fifo.library libs:
  209.   endif
  210. endif
  211.  
  212. if not exists libs:arp.library
  213.   ask "Install arp.library (y/n)?"
  214.   if warn
  215.     copy afax:libs/arp.library libs:
  216.   endif
  217. endif
  218.  
  219. echo "*NIf you are not using AmigaDOS2.0, you may wish to extract the"
  220. echo "larger CM fax fonts into your FONTS: directory. Under 2.0 you can"
  221. echo "scale standard fonts, so this is not necessary. You can do it manually"
  222. echo "later if you want."
  223. ask "*NDo you want the FaxFonts extracted to FONTS: (y/n)?"
  224. if warn
  225.   cd fonts:
  226.   AmiFax:FaxFonts.run
  227. endif
  228.  
  229. echo "*NDirectory afax:BBS"
  230. if not exists afax:BBS.info
  231.   if exists AmiFax:BBS.info
  232.     copy AmiFax:BBS.info afax:BBS.info nopro
  233.   endif
  234. endif
  235. if exists AmiFax:BBS
  236.   copy AmiFax:BBS afax:BBS all
  237. endif
  238.  
  239. echo "*NAFax Assigns"
  240. execute afax:s/AFaxAssign
  241.  
  242. echo "*NInstallation complete."
  243. echo "You now must edit configuration files in the s and lib directories"
  244. echo "See the README file for instructions."
  245. ask "*NPress return to continue."
  246. skip to_end
  247.  
  248. lab to_redo
  249. echo "*NEnter the name of the disk and drawer"
  250. echo "where you want to install AmigaFax.  Type a colon between"
  251. echo "disk and drawer parts and enclose it all in double quotes."
  252. echo "Example: *"Work:fax*" (q=quit): " noline
  253. execute >nil: AmiFax:install ?
  254. lab to_end
  255.  
  256.